async function fun() {
    await $.ajax({
        url: 'https://www.fastmock.site/mock/bb4157f45a0b5ffdcb3f6d984517a6c0/woniuMovie/getAllMovies',
        success: (data) => {
            const movies = data.movies;
            movies.forEach(movie => {
                $("ul").append($(
                    `<a href="details.html?id=${movie.id}">
                    <li>
                        <div><img src="${movie.imgSrc}" alt=""></div>
                        <p>${movie.title}</p>
                    </li>
                </a>`
                ));
            });
        }
    });

    $(".more").on('click', function () {
        if ($(this).siblings().text() == "正在热映") {
            location.assign(`../html/xiangqing.html?moviehot`);
        }else{
            location.assign(`../html/xiangqing.html?moviecoming`);
        }
    });
}
fun();
